import request from '@/utils/request'

// 查询工作执行记录列表
export function listExecutionRecord(query) {
  return request({
    url: '/system/executionRecord/list',
    method: 'get',
    params: query
  })
}

// 查询工作执行记录详细
export function getExecutionRecord(id) {
  return request({
    url: '/system/executionRecord/' + id,
    method: 'get'
  })
}

// 查询工作执行记录详细
export function getExecutionRecordByRefId(refId) {
  return request({
    url: '/system/executionRecord/queryByRefId',
    method: 'post',
    data: refId
  })
}

// 新增工作执行记录
export function addExecutionRecord(data) {
  return request({
    url: '/system/executionRecord',
    method: 'post',
    data: data
  })
}

// 修改工作执行记录
export function updateExecutionRecord(data) {
  return request({
    url: '/system/executionRecord',
    method: 'put',
    data: data
  })
}

// 删除工作执行记录
export function delExecutionRecord(id) {
  return request({
    url: '/system/executionRecord/' + id,
    method: 'delete'
  })
}
